/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tencent.tendon.convert.json;

import java.lang.reflect.Type;

/**
 *
 * @author nbzhang
 */
@SuppressWarnings("unchecked")
public abstract class JsonEncoder<T> implements JsonEncodable<T> {

    protected final Type type;

    protected boolean simpled;

    public JsonEncoder(Type type) {
        this.type = type;
    }

    @Override
    public abstract void convertTo(final JsonWriter out, final T value);

    @Override
    public final Type getType() {
        return this.type;
    }

    @Override
    public final boolean isSimpled() {
        return this.simpled;
    }
}
